#pragma once

using namespace System;
using namespace NUnit::Framework;
using namespace LatoolNet;

namespace LatoolNetTest {

	[TestFixture]
	public ref class LUFactorizationTest {
	public:
		[Test]
		void TestFactorize() {
			
			Matrix ^ mat = gcnew Matrix(4, 4);

			mat[0,0] = 1.80;
			mat[0,1] = 2.88;
			mat[0,2] = 2.05;
			mat[0,3] = -0.89;

			mat[1,0] = 5.25;
			mat[1,1] = -2.95;
			mat[1,2] = -0.95;
			mat[1,3] = -3.80;

			mat[2,0] = 1.58;
			mat[2,1] = -2.69;
			mat[2,2] = -2.90;
			mat[2,3] = -1.04;

			mat[3,0] = -1.11;
			mat[3,1] = -0.66;
			mat[3,2] = -0.59;
			mat[3,3] = 0.80;

			LUFactorization::Factorize(mat);

			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 4; j++) {
					Console::WriteLine(mat[i, j].ToString());
				}
			}

		};

	};
}
